<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.yaodian100.core.common.utils.ServerValue"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>

<c-rt:set var="midContextPath" value='<%=ServerValue.getMidContextPath()%>'/>

<script src="/js/jquery.form.js"></script>
<script type="text/javascript">
	$().ready(function(){
		$("#confirmBlockDialog").dialog({
			bgiframe: true
			,title: '新增异常记录'
			,width: 400
			,height: 220
			,modal: true
			,resizable: true
			,buttons: {
				"取消": function() {
					$(this).dialog("close"); 
				}
				,"碉定": function() {
					var targetForm = $("#confirmBlockDialogForm");
					var now = new Date();
					var millisecondsOfNow = now.getTime();
					targetForm.ajaxForm({
						url:'${midContextPath}/member/blackBook!addBlackBookByMemberId.do' + '?timeStamp=' + millisecondsOfNow
						,target:$("#${param.refreshZone}")
					});
					targetForm.submit();
					$(this).dialog("close");
					$(this).remove();
				}
			}
		});
	});
</script>

<div id="confirmBlockDialog" style="display:none" >
	<s:form id="confirmBlockDialogForm">
		<s:hidden name="blackBook.memberId" />
		<s:hidden name="memberId" value="%{blackBook.memberId}" /><%-- 為了重新傳 memberId 到 list 頁 --%>
		<table class="tb-1">
			<tr>
				<td>
					异常原因：
				</td>
				<td>
					<s:select name="blackBook.blockReason" list="%{blockReasonMenu.options}" listKey="key" listValue="value.name" >
					</s:select>
				</td>
			</tr>
			<tr>
				<td>
					异常原因描述：
				</td>
				<td>
					<s:textarea name="blackBook.blockReasonDesc" cols="45" rows="3"></s:textarea>
				</td>
			</tr>
		</table>
	</s:form>
</div>
